﻿@using Microsoft.AspNetCore.Mvc.Localization;
@inject IViewLocalizer Localizer
@using LView.CMS.Models;
@model List<LMSManagerRole>
@{
    ViewData["Title"] = "用户管理";
}

<form class="layui-form layui-form-pane" style="width:100%;">
    @Html.AntiForgeryToken()
    @Html.Hidden("Id")
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">@Localizer["LogInID"]</label>
        <div class="layui-input-block">
            <input type="text" name="UserName" class="layui-input UserName" lay-verify="required|username" placeholder="@Localizer["LogInIDPlaceholder"]">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">@Localizer["Role"]</label>
        <div class="layui-input-block">
            <select name="RoleId" class="RoleId" lay-filter="RoleId" lay-verify="required">
                @foreach (var item in Model)
                {
                    <option value="@item.Id">@item.RoleName</option>
                }
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">@Localizer["UserName"]</label>
        <div class="layui-input-block">
            <input type="text" name="NickName" class="layui-input NickName" placeholder="@Localizer["UserNamePlaceholder"]" lay-verify="required|username" autocomplete="off" />
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">@Localizer["PhoneNumber"]</label>
        <div class="layui-input-block">
            <input type="text" name="Mobile" class="layui-input Mobile" placeholder="@Localizer["PhoneNumberPlaceholder"]" autocomplete="off" />
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label">@Localizer["Email"]</label>
        <div class="layui-input-block">
            <input type="text" name="Email" class="layui-input Email" placeholder="@Localizer["EmailPlaceholder"]" autocomplete="off" />
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12" pane>
        <label class="layui-form-label">@Localizer["IsLock"]</label>
        <div class="layui-input-block">
            <input type="checkbox" name="IsLock" class="IsLock" lay-filter="IsLock" lay-skin="switch" lay-text="@Localizer["Yes"]|@Localizer["No"]" value="1" />
        </div>
    </div>
    <div class="layui-form-item layui-form-text layui-col-xs12">
        <label class="layui-form-label">@Localizer["Remark"]</label>
        <div class="layui-input-block">
            <textarea placeholder="@Localizer["RemarkPlaceholder"]" name="Remark" class="layui-textarea Remark"></textarea>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="addManager">@Localizer["Submit"]</button>
            <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary">@Localizer["Reset"]</button>
        </div>
    </div>
</form>
@section Scripts{
    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script type="text/javascript" src="~/js/manager/managerAdd.js?_=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
}
